﻿using System;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text.Json.Serialization;

[Table("QHSE_XY_VIOLATION")]
public class QHSESysXyViolation : EntityBase
{
    public QHSESysXyViolation()
    {
    }


    /// <summary>
    /// 违章id
    /// </summary>
    [Column("QHSE_XY_VIOLATION_ID")]
    [MaxLength(32)]
    [Key]
    public string QhseXyViolationId { get; set; } = "";
    /// <summary>
    /// 检查类型
    /// </summary>
    [Column("CHECK_TYPE")]
    [MaxLength(200)]
    public string Check_Type { get; set; }
    /// <summary>
    /// 检查单位
    /// </summary>
    [Column("CHECKORGANIZATIONID")]
    [MaxLength(200)]
    public string? CheckOrganizationId { get; set; } = "";
    /// <summary>
    /// 检查人员ID
    /// </summary>
    [Column("USER_ID")]
    [MaxLength(32)]
    public string UserId { get; set; }
    /// <summary>
    /// 检查人员姓名
    /// </summary>
    [Column("CHECK_NAME")]
    [MaxLength(255)]
    public string UserName { get; set; }
    /// <summary>
    /// 检查日期
    /// </summary>
    [Column("CHECK_DATE")]
    public DateTime CheckDate { get; set; }


    /// <summary>
    /// 录入日期
    /// </summary>
    [Column("ENTER_DATE")]
    public DateTime? EnterTime { get; set; }

    /// <summary>
    /// 数据来源
    /// </summary>
    [Column("ENTER_SYS")]
    [MaxLength(100)]
    public string? EnterSys { get; set; }
    /// <summary>
    /// 被检单位ID
    /// </summary>
    [Column("ORGANIZATION_ID")]
    [MaxLength(255)]
    public string OrganizationId { get; set; }

    /// <summary>
    /// 被检单位名称
    /// </summary>
    [MaxLength(200)]
    [Column("ORGANIZATION_NAME")]
    public string OrganizationName { get; set; }

    /// <summary>
    /// 作业项目
    /// </summary>
    [MaxLength(100)]
    [Column("WORK_ITEM")]
    public string WorkItem { get; set; }
    /// <summary>
    /// 作业专业
    /// </summary>
    [MaxLength(100)]
    [Column("WORK_SPECIALTY")]
    public string WorkSpecialty { get; set; }

    /// <summary>
    /// 关键作业类型
    /// </summary>
    [MaxLength(32)]
    [Column("WORK_TYPE")]
    public string? WorkType { get; set; }

    /// <summary>
    /// 关键作业内容
    /// </summary>
    [MaxLength(1000)]
    [Column("WORK_CONTENT")]
    public string? WorkContent { get; set; }
    /// <summary>
    /// 作业风险等级
    /// </summary>
    [MaxLength(32)]
    [Column("WORK_RISK")]
    public string? WorkRisk { get; set; }

    /// <summary>
    /// 位置区域
    /// </summary>
    [MaxLength(255)]
    [Column("LOCATION")]
    public string Location { get; set; }

    /// <summary>
    /// 违章人员ID
    /// </summary>
    [MaxLength(32)]
    [Column("VIOLATION_USER_ID")]
    public string ViolationUserId { get; set; }

    /// <summary>
    /// 违章人员姓名
    /// </summary>
    [MaxLength(255)]
    [Column("VIOLATION_USER_NAME")]
    public string ViolationUserName { get; set; }
    /// <summary>
    /// 违章人员单位名称
    /// </summary>
    [MaxLength(100)]
    [Column("VIOLATION_USER_DEPART")]
    public string? ViolationUserDepart { get; set; }

    /// <summary>
    /// 违章人员工号
    /// </summary>
    [MaxLength(100)]
    [Column("VIOLATION_USER_ERP")]
    public string? Erp { get; set; }


    /// <summary>
    /// 违章岗位
    /// </summary>
    [MaxLength(32)]
    [Column("POSITION")]
    public string Position { get; set; }

    /// <summary>
    /// 年龄
    /// </summary>
    [MaxLength(32)]
    [Column("AGE")]
    public string Age { get; set; }

    /// <summary>
    /// 工龄
    /// </summary>
    [MaxLength(32)]
    [Column("WORK_YEARS")]
    public string WorkYears { get; set; }

    /// <summary>
    /// 用工性质
    /// </summary>
    [MaxLength(32)]
    [Column("EMPLOYEE_TYPE")]
    public string EmployeeType { get; set; } = "";

    /// <summary>
    /// 违章扣分
    /// </summary>
    [Column("SCORE")]
    public float Score { get; set; }

    /// <summary>
    /// 罚款
    /// </summary>
    [Column("FINE")]
    public float Fine { get; set; }

    /// <summary>
    /// 违章性质分类
    /// </summary>
    [MaxLength(32)]
    [Column("VIOLATION_TYPE_CATEGORY")]
    public string ViolationTypeCategory { get; set; } = "";

    /// <summary>
    /// 违章性质
    /// </summary>
    [MaxLength(32)]
    [Column("VIOLATION_TYPE")]
    public string ViolationType { get; set; }

    /// <summary>
    /// 违章条款
    /// </summary>
    [MaxLength(1000)]
    [Column("VIOLATION_CLAUSE")]
    public string? ViolationClause { get; set; }

    /// <summary>
    /// 违章描述
    /// </summary>
    [MaxLength(1000)]
    [Column("DESCRIPTION")]
    public string Description { get; set; } = "";

    /// <summary>
    /// 违章类别
    /// </summary>
    [MaxLength(100)]
    [Column("VIOLATION_CATEGORY")]
    public string ViolationCategory { get; set; }

    /// <summary>
    /// 对应要素体系
    /// </summary>
    [MaxLength(100)]
    [Column("HSE_ELEMENT")]
    public string HseElement { get; set; }

    /// <summary>
    /// 对应安全沟通类型
    /// </summary>
    [MaxLength(100)]
    [Column("OBSERVE_COMM")]
    public string? ObserveComm { get; set; }

    /// <summary>
    /// 原因分析
    /// </summary>
    [MaxLength(32)]
    [Column("CAUSE_ANALYSIS")]
    public string CauseAnalysis { get; set; }

    /// <summary>
    /// 归属直线部门
    /// </summary>
    [MaxLength(32)]
    [Column("DIRECT_DEPARTMENT")]
    public string DirectDepartment { get; set; }

    /// <summary>
    /// 可能后果
    /// </summary>
    [MaxLength(32)]
    [Column("POTENTIAL_CONSEQUENCE")]
    public string PotentialConsequence { get; set; }

    /// <summary>
    /// 图片
    /// </summary>
    [MaxLength(1000)]
    [Column("PIC")]
    public string? Pic { get; set; }

    [MaxLength(1000)]
    [Column("IMAGE_HASH")]
    public string? ImageHash { get; set; }
    /// <summary>
    /// 违章性质ID
    /// </summary>
    [MaxLength(255)]
    [Column("VIOLATIONCATE_ID")]
    public string? ViolationCateId { get; set; }
    /// <summary>
    /// 检查类型编码
    /// </summary>
    [MaxLength(255)]
    [Column("CHECKTYPE_CODE")]
    public string? CheckTypeCode { get; set; }
    /// <summary>
    /// 关键作业编码
    /// </summary>
    [MaxLength(255)]
    [Column("KEYWORK_CODE")]
    public string? KeyWorkCode { get; set; }
    /// <summary>
    /// 作业专业编码
    /// </summary>
    [MaxLength(255)]
    [Column("WORKSPECIALTY_CODE")]
    public string? WorkSpecialtyCode { get; set; }
    /// <summary>
    /// 违章性质编码
    /// </summary>
    [MaxLength(255)]
    [Column("VIOLATIONTYPE_CODE")]
    public string? ViolationTypeCode { get; set; }
    /// <summary>
    /// 要素体系编码
    /// </summary>
    [MaxLength(255)]
    [Column("HSE_CODE")]
    public string? HseCode { get; set; }
    /// <summary>
    /// 归属部门编码
    /// </summary>
    [MaxLength(255)]
    [Column("DEPARTMENT_CODE")]
    public string? DepartmentCode { get; set; }
    /// <summary>
    /// 原因分析编码
    /// </summary>
    [MaxLength(255)]
    [Column("CLAUSEANALYSIS_CODE")]
    public string? ClauseAnalysisCode { get; set; }
    /// <summary>
    /// 用工性质编码
    /// </summary>
    [MaxLength(255)]
    [Column("EMPLOYEETYPE_CODE")]
    public string? EmployeeTypeCode { get; set; }
    /// <summary>
    /// 工龄编码
    /// </summary>
    [MaxLength(255)]
    [Column("WORKYEARS_CODE")]
    public string? WorkYearsCode { get; set; }
    /// <summary>
    /// 年龄编码
    /// </summary>
    [MaxLength(255)]
    [Column("AGE_CODE")]
    public string? AgeCode { get; set; }
    /// <summary>
    /// 可能后果编码
    /// </summary>
    [MaxLength(255)]
    [Column("CONSEQUENCES_CODE")]
    public string? ConsequencesCode { get; set; }
    /// <summary>
    /// 违章岗位编码
    /// </summary>
    [MaxLength(255)]
    [Column("POSITION_CODE")]
    public string? PositionCode { get; set; }
    /// <summary>
    /// 位置区域编码
    /// </summary>
    [MaxLength(255)]
    [Column("LOCATION_CODE")]
    public string? LocationCode { get; set; }

    /// <summary>
    /// 二级组织机构ID
    /// </summary>
    [Column("SECOND_ORGANIZATIONID")]
    [MaxLength(50)]
    public string? SecondOrganizationId { get; set; } = "";
    /// <summary>
    /// 三级组织机构ID
    /// </summary>
    [Column("THIRD_ORGANIZATIONID")]
    [MaxLength(50)]
    public string? ThirdOrganizationId { get; set; } = "";

    /// <summary>
    /// 更新人id
    /// </summary>
    [MaxLength(50)]
    [Column("UPDATE_BY")]
    public string? UpdateBy { get; set; }
    /// <summary>
    /// 更新时间
    /// </summary>
    [Column("UPDATE_TIME")]
    public DateTime? UpdateTime { get; set; }

    /// <summary>
    /// 是否为重复性违章
    /// </summary>
    [Column("TIMES_VIOLATION")]
    public int? TimesViolation { get; set; } = -1;

    /// <summary>
    /// 处置意见
    /// </summary>
    [MaxLength(255)]
    [Column("MANAGEMENT")]
    public string? Management { get; set; }

    /// <summary>
    /// 视频链接
    /// </summary>
    [MaxLength(255)]
    [Column("VIDEO_URL")]
    public string? VideoUrl { get; set; }

    /// <summary>
    /// 数据检查方式
    /// </summary>
    [MaxLength(255)]
    [Column("INSPECTION_METHOD")]
    public string? InspectionMethod { get; set; }
}
